package controller.listeners.posCodeCorps;



import model.ManualCodeCorpTestModel;
import model.PosCodeCorpsModel;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

import view.ManualCodeCorpTestView;
import view.PosCodeCorpsView;

public class CodedDoneFilterSelectionListener extends SelectionAdapter {


	private PosCodeCorpsView _view;
	private PosCodeCorpsModel _model;
	
			public CodedDoneFilterSelectionListener(PosCodeCorpsView view,
					PosCodeCorpsModel model) {
				this._model = model;
				this._view = view;
			}
			
			public void widgetSelected(SelectionEvent event) {
				
				 _model.reset();
			 	 
			 	 _model.setCorpFilter(_view.getCorpFilter());
			 	 _model.setProvFilter(_view.getProvFilter());
			 	 _model.setInstitFilter(_view.getInstitFilter());
			 	 _model.setOrgFilter(_view.getOrgFilter());
			 	 _model.setPosCodedDoneFilter(_view.getCodedDoneFilter());
		 
			 	 _model.next(false);
			 	 
			 	 _view.set_Corp(_model.get_corp());
			 	 _view.setCenters(_model.getCenters());
			 	 _view.set_PosCodedCenters(_model.get_poscodedCenters());
				
				
			}
		}